#include "data.hpp"
void test_dish()
{

  order_sys::TableDish* pdish = new order_sys::TableDish();
  Json::Value dish;
//  dish["name"] = "椒盐蘑菇";
//  dish["price"] = 1100;
//  dish["info"] = "平菇加上椒盐，营养丰富";
//  pdish->Insert(dish); 
//  pdish->Update(3,dish);
//  pdish->Delete(2);
  pdish->GetAll(&dish);
//  pdish->GetOne(1,&dish);
  Json::StyledWriter writer;
  std::cout << writer.write(dish) << std::endl;
}

void test_order()
{
  Json::Value order;
//  order["table_id"] = "2";
//  order["status"] = 1;
//  order["dishes"] = "[1,3]";
  order_sys::TableOrder* porder = new order_sys::TableOrder();
//  porder->Insert(order);
//  porder->Update(3,order);
//  porder->Delete(2);
//  porder->GetOne(4,&order);
  if(porder->GetAll(&order) == false){
    return ;
  }
  Json::StyledWriter writer;
  std::cout << writer.write(order) << std::endl;

}

int main()
{
//  test_dish();
  test_order();
  return 0;
}
